import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
// 注册全局组件
import HospitalTop from './components/HospitalTop.vue'
import HospitalBottom from './components/HospitalBottom.vue'
import Login from './components/login/LoginView.vue'
import VisitorList from '@/components/VisitorList.vue'

import router from './router'
import pinia from './store'
import ElementPlus from 'element-plus'
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
import 'element-plus/dist/index.css'
//国际化文件
//@ts-ignore
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'

const app = createApp(App)
app.component('HospitalTop', HospitalTop)
app.component('HospitalBottom', HospitalBottom)
app.component('Login', Login)
app.component('VisitorList', VisitorList)
app.use(router)
app.use(pinia)
app.use(ElementPlus, {
    locale: zhCn,
})
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {  //遍历ElementPlusIconsVue对象
    app.component(key, component);
}
// 路由鉴权文件
import './permission.js'


app.mount('#app')
